
package LwJGL;
import org.lwjgl.opengl.GL11;
import static org.lwjgl.opengl.GL11.*;
/**
 * Pyramid.java
 * Created on May 4, 2014
 * Author Joe Porter
 */
public class Pyramid {
    float rotation;
    public void renderGl(){
        //GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
        //glLoadIdentity();
        //glTranslatef(0f, 0f, -6.0f);
        //glRotatef(rotation, 1f, 1f,1f);
        GL11.glBegin(GL11.GL_TRIANGLES);                    // Drawing Using Triangles
            GL11.glColor3f(1.0f,0.0f,0.0f);             // Red
            GL11.glVertex3f( 0.0f, 1.0f, 0.0f);         // Top Of Triangle (Front)
            GL11.glColor3f(0.0f,1.0f,0.0f);             // Green
            GL11.glVertex3f(-1.0f,-1.0f, 1.0f);         // Left Of Triangle (Front)
            GL11.glColor3f(0.0f,0.0f,1.0f);             // Blue
            GL11.glVertex3f( 1.0f,-1.0f, 1.0f);         // Right Of Triangle (Front)
            GL11.glColor3f(1.0f,0.0f,0.0f);             // Red
            GL11.glVertex3f( 0.0f, 1.0f, 0.0f);         // Top Of Triangle (Right)
            GL11.glColor3f(0.0f,0.0f,1.0f);             // Blue
            GL11.glVertex3f( 1.0f,-1.0f, 1.0f);         // Left Of Triangle (Right)
            GL11.glColor3f(0.0f,1.0f,0.0f);             // Green
            GL11.glVertex3f( 1.0f,-1.0f, -1.0f);            // Right Of Triangle (Right)
            GL11.glColor3f(1.0f,0.0f,0.0f);             // Red
            GL11.glVertex3f( 0.0f, 1.0f, 0.0f);         // Top Of Triangle (Back)
            GL11.glColor3f(0.0f,1.0f,0.0f);             // Green
            GL11.glVertex3f( 1.0f,-1.0f, -1.0f);            // Left Of Triangle (Back)
            GL11.glColor3f(0.0f,0.0f,1.0f);             // Blue
            GL11.glVertex3f(-1.0f,-1.0f, -1.0f);            // Right Of Triangle (Back)
            GL11.glColor3f(1.0f,0.0f,0.0f);             // Red
            GL11.glVertex3f( 0.0f, 1.0f, 0.0f);         // Top Of Triangle (Left)
            GL11.glColor3f(0.0f,0.0f,1.0f);             // Blue
            GL11.glVertex3f(-1.0f,-1.0f,-1.0f);         // Left Of Triangle (Left)
            GL11.glColor3f(0.0f,1.0f,0.0f);             // Green
            GL11.glVertex3f(-1.0f,-1.0f, 1.0f);  
        GL11.glEnd();  
        

rotation+=1f;

    }
}
